<template>
  <div class="orderTest-container">
    <el-input
      v-model="title"
      placeholder="标题"
      style="width: 200px"
    ></el-input>
    <el-select
      v-model="tag"
      multiple
      filterable
      allow-create
      default-first-option
      placeholder="请选择标签"
    >
      <el-option
        v-for="item in options"
        :key="item.value"
        :label="item.id"
        :value="item.name"
      ></el-option>
    </el-select>
    <mavon-editor
      v-model="content"
      style="height: 600px"
      @save="save"
      @htmlcode="htmlcode"
    ></mavon-editor>
    <div v-html="content">{{ content }}</div>
  </div>
</template>
<script>
  import { mavonEditor } from "mavon-editor";
  export default {
    name: "CreateBlog",
    components: {
      mavonEditor,
    },
    data() {
      return {
        tag: "",
        title: "",
        content: "",
        apiKey: "",
        options: [],
        opt: {
          uploadImage: true,
          theme: "dark",
        },
        cc: "",
      };
    },
    created() {},
    mounted() {},
    computed: {},
    watch: {},
    methods: {
      save(value, render) {
        console.log("params", value);
        console.log("====================");
        console.log("", render);
      },
      htmlcode(a) {
        console.log("a", a);
      },
    },
  };
</script>
<style lang="scss" scoped></style>
